<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<meta http-equiv="content-style-type" content="text/css"/>
<meta http-equiv="content-script-type" content="text/javascript"/>
<meta name="version" content="neblog-1.0"/>
<title>hikerwu</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="js/tool.js"></script>
<style>
    .dataout { width:100%; height:660px;overflow-x:scroll;}
</style>
</head>
<body>

<div>
    <p><select id="s_ch">
        <option value="">请选择</option>
        <option value="news_news_top">news_news_top</option>
        <option value="news_news_tech">news_news_tech</option>
        <option value="news_news_digi">news_news_digi</option>
        <option value="news_news_ent">news_news_ent</option>
    </select></p>
    <div>
        <!--{if $out.newslist}-->
            <!--{section name=t loop=$out.newslist}-->
            <div><table><tr><td width="330px"><span title="<!--{$out.newslist[t].id}-->"><!--{$out.newslist[t].title}--></span></td>
                <td width="200px"><!--{$out.newslist[t].ncomment}--></td>
                <td><span title="<!--{$out.newslist[t].id}-->">
                <button id="b_url">url</button>
                <button id="b_curl">curl</button>
                <button id="b_turl">turl</button>
                <button id="b_gurl" onclick="window.open('<!--{$out.newslist[t].thumbnails[0]}-->', '_blank');">img</button>
                <button id="b_opendetail" detail="<!--{$out.newslist[t].detail}-->">detail</button>
                </span></td></tr></table>
            </div>
            <!--{/section}-->
        <!--{/if}-->
    </div>
</div>
<script type="text/javascript">

$("#s_ch").val("<!--{$out.chlid}-->");
$().ready(function(){
    $("#s_ch").change(function(){
        window.location.href = "?m=ArticleList&a=display&chlid="+this.value;
    });
    $("[id='b_url']").click(function(){
        var aid = $(this).parent().attr("title");
        window.open("http://view.inews.qq.com/a/"+aid,'_blank');
    });
    $("[id='b_curl']").click(function(){
        var aid = $(this).parent().attr("title");
        getUrl( aid );
    });
    $("[id='b_turl']").click(function(){
        var aid = $(this).parent().attr("title");
        getTUrl( aid );
    });
    $("[id='b_opendetail']").click(function(){
        openDetail( $(this).attr("detail") );
    });
});

function openDetail( str )
{
    myWindow=window.open('','','width=1000,height=1200');
    myWindow.document.write(str);
    myWindow.focus();
}

function getTUrl( id )
{
    var data = {};
    data['id'] = id;
    var url = '/hiker/?m=ArticleList&a=getTUrl';
    $.ajax({type: "POST", url: url, data: data, success: function(str){
        var info = "var result=" + str +';';
        try{
            eval(info);
        } catch(exception) {
            alert(info);
        }
        if(result['ret']){
            window.open(result['data'],'_blank');
        } else {
            alert(result['info']);
        }
    }});
}

function getUrl( id )
{
    var data = {};
    data['id'] = id;
    var url = '/hiker/?m=ArticleList&a=getUrl';
    $.ajax({type: "POST", url: url, data: data, success: function(str){
        var info = "var result=" + str +';';
        try{
            eval(info);
        } catch(exception) {
            alert(info);
        }
        if(result['ret']){
            var url = "http://tcomment.tech.qq.com/rend/rend/rending?url="+result['data'];
            window.open(url,'_blank');
        } else {
            alert(result['info']);
        }
    }});
}
</script>

</body>
</html>
